7.0
HIGH CVSS 3.1
CVE-2026-4878
Libcap: libcap: privilege escalation via toctou race condition in cap_set_file()
Description

A flaw was found in libcap. A local unprivileged user can exploit a Time-of-check-to-time-of-use (TOCTOU) race condition in the `cap_set_file()` function. This allows an attacker with write access to a parent directory to redirect file capability updates to an attacker-controlled file. By doing so, capabilities can be injected into or stripped from unintended executables, leading to privilege escalation.

INFO

Published Date :

April 9, 2026, 4:16 p.m.

Last Modified :

June 8, 2026, 3:16 a.m.

Remotely Exploit :

No
Affected Products

The following products are affected by CVE-2026-4878 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Redhat enterprise_linux
2 Redhat openshift_container_platform
3 Redhat update_infrastructure
4 Redhat enterprise_linux
5 Redhat discovery
6 Redhat openshift_distributed_tracing
7 Redhat hardened_images
1 Gnu emacs
2 Gnu grub2
1 Gnome libsoup
1 Libcap_project libcap
1 Ubuntu libefiboot
CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 3.1 MEDIUM 53f830b8-0a3f-465b-8143-3b8a9948e749
CVSS 3.1 MEDIUM [email protected]
CVSS 3.1 MEDIUM MITRE-CVE
CVSS 3.1 HIGH [email protected]
Solution
Address the TOCTOU race condition in cap_set_file to prevent unauthorized capability modification.
  • Update the libcap library to the latest version.
  • Review file system access controls for sensitive directories.
  • Monitor for unexpected changes in file capabilities.
Public PoC/Exploit Available at Github

CVE-2026-4878 has a 4 public PoC/Exploit available at Github. Go to the Public Exploits tab to see the list.

References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2026-4878.

URL Resource
https://access.redhat.com/errata/RHSA-2026:12423
https://access.redhat.com/errata/RHSA-2026:12441
https://access.redhat.com/errata/RHSA-2026:13285
https://access.redhat.com/errata/RHSA-2026:14162
https://access.redhat.com/errata/RHSA-2026:14937
https://access.redhat.com/errata/RHSA-2026:19130
https://access.redhat.com/errata/RHSA-2026:19346
https://access.redhat.com/errata/RHSA-2026:19456
https://access.redhat.com/errata/RHSA-2026:19458
https://access.redhat.com/errata/RHSA-2026:20595
https://access.redhat.com/errata/RHSA-2026:21254
https://access.redhat.com/errata/RHSA-2026:21275
https://access.redhat.com/errata/RHSA-2026:22634
https://access.redhat.com/errata/RHSA-2026:22957
https://access.redhat.com/errata/RHSA-2026:24346
https://access.redhat.com/errata/RHSA-2026:7473 Vendor Advisory
https://access.redhat.com/security/cve/CVE-2026-4878 Vendor Advisory
https://bugzilla.redhat.com/show_bug.cgi?id=2447554 Permissions Required
https://bugzilla.redhat.com/show_bug.cgi?id=2451615 Issue Tracking Vendor Advisory
http://www.openwall.com/lists/oss-security/2026/04/07/14 Mailing List Third Party Advisory
http://www.openwall.com/lists/oss-security/2026/04/07/4 Mailing List Third Party Advisory
http://www.openwall.com/lists/oss-security/2026/04/08/9 Mailing List Third Party Advisory
http://www.openwall.com/lists/oss-security/2026/04/09/5 Exploit Mailing List Third Party Advisory
http://www.openwall.com/lists/oss-security/2026/04/09/6 Exploit Mailing List Third Party Advisory
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2026-4878 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2026-4878 weaknesses.

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

None

Updated: 2 weeks, 6 days ago
0 stars 0 fork 0 watcher
Born at : May 20, 2026, 12:53 p.m. This repo has been linked 1 different CVEs too.

trivy-nginx-scan

Updated: 1 month, 3 weeks ago
0 stars 0 fork 0 watcher
Born at : April 14, 2026, 1:37 p.m. This repo has been linked 106 different CVEs too.

STIG-hardened crewAI for federal/DoD deployment

Dockerfile Python JavaScript Jinja CSS Shell

Updated: 1 month, 2 weeks ago
0 stars 0 fork 0 watcher
Born at : April 9, 2026, 7:09 p.m. This repo has been linked 2 different CVEs too.

None

Dockerfile Python

Updated: 1 month ago
0 stars 0 fork 0 watcher
Born at : Jan. 25, 2026, 2:26 p.m. This repo has been linked 5 different CVEs too.

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2026-4878 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2026-4878 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by [email protected]

    Jun. 08, 2026

    Action Type Old Value New Value
    Added Reference https://access.redhat.com/errata/RHSA-2026:24346
  • CVE Modified by [email protected]

    Jun. 04, 2026

    Action Type Old Value New Value
    Added Reference https://access.redhat.com/errata/RHSA-2026:22957
  • CVE Modified by [email protected]

    Jun. 02, 2026

    Action Type Old Value New Value
    Added Reference https://access.redhat.com/errata/RHSA-2026:22634
  • CVE Modified by [email protected]

    May. 27, 2026

    Action Type Old Value New Value
    Added Reference https://access.redhat.com/errata/RHSA-2026:21254
  • CVE Modified by [email protected]

    May. 27, 2026

    Action Type Old Value New Value
    Added Reference https://access.redhat.com/errata/RHSA-2026:21275
  • CVE Modified by [email protected]

    May. 26, 2026

    Action Type Old Value New Value
    Added Reference https://access.redhat.com/errata/RHSA-2026:20595
  • CVE Modified by [email protected]

    May. 20, 2026

    Action Type Old Value New Value
    Added Reference https://access.redhat.com/errata/RHSA-2026:19458
  • CVE Modified by [email protected]

    May. 20, 2026

    Action Type Old Value New Value
    Added Reference https://access.redhat.com/errata/RHSA-2026:19456
  • CVE Modified by [email protected]

    May. 19, 2026

    Action Type Old Value New Value
    Added Reference https://access.redhat.com/errata/RHSA-2026:19346
  • CVE Modified by [email protected]

    May. 19, 2026

    Action Type Old Value New Value
    Added Reference https://access.redhat.com/errata/RHSA-2026:19130
  • CVE Modified by [email protected]

    May. 07, 2026

    Action Type Old Value New Value
    Added Reference https://access.redhat.com/errata/RHSA-2026:14937
  • CVE Modified by [email protected]

    May. 06, 2026

    Action Type Old Value New Value
    Added Reference https://access.redhat.com/errata/RHSA-2026:14162
  • CVE Modified by [email protected]

    May. 04, 2026

    Action Type Old Value New Value
    Added Reference https://access.redhat.com/errata/RHSA-2026:13285
  • CVE Modified by [email protected]

    Apr. 30, 2026

    Action Type Old Value New Value
    Added Reference https://access.redhat.com/errata/RHSA-2026:12441
  • CVE Modified by [email protected]

    Apr. 30, 2026

    Action Type Old Value New Value
    Added Reference https://access.redhat.com/errata/RHSA-2026:12423
  • Initial Analysis by [email protected]

    Apr. 28, 2026

    Action Type Old Value New Value
    Added CVSS V3.1 AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
    Added CPE Configuration OR *cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:* *cpe:2.3:a:redhat:openshift_container_platform:4.0:*:*:*:*:*:*:* *cpe:2.3:o:redhat:enterprise_linux:9.0:*:*:*:*:*:*:* *cpe:2.3:a:libcap_project:libcap:-:*:*:*:*:*:*:* *cpe:2.3:o:redhat:enterprise_linux:10.0:*:*:*:*:*:*:*
    Added Reference Type CVE: http://www.openwall.com/lists/oss-security/2026/04/07/14 Types: Mailing List, Third Party Advisory
    Added Reference Type CVE: http://www.openwall.com/lists/oss-security/2026/04/07/4 Types: Mailing List, Third Party Advisory
    Added Reference Type CVE: http://www.openwall.com/lists/oss-security/2026/04/08/9 Types: Mailing List, Third Party Advisory
    Added Reference Type CVE: http://www.openwall.com/lists/oss-security/2026/04/09/5 Types: Exploit, Mailing List, Third Party Advisory
    Added Reference Type CVE: http://www.openwall.com/lists/oss-security/2026/04/09/6 Types: Exploit, Mailing List, Third Party Advisory
    Added Reference Type Red Hat, Inc.: https://access.redhat.com/errata/RHSA-2026:7473 Types: Vendor Advisory
    Added Reference Type Red Hat, Inc.: https://access.redhat.com/security/cve/CVE-2026-4878 Types: Vendor Advisory
    Added Reference Type Red Hat, Inc.: https://bugzilla.redhat.com/show_bug.cgi?id=2447554 Types: Permissions Required
    Added Reference Type Red Hat, Inc.: https://bugzilla.redhat.com/show_bug.cgi?id=2451615 Types: Issue Tracking, Vendor Advisory
  • CVE Modified by [email protected]

    Apr. 25, 2026

    Action Type Old Value New Value
    Added Reference https://access.redhat.com/errata/RHSA-2026:7473
  • New CVE Received by [email protected]

    Apr. 09, 2026

    Action Type Old Value New Value
    Added Description A flaw was found in libcap. A local unprivileged user can exploit a Time-of-check-to-time-of-use (TOCTOU) race condition in the `cap_set_file()` function. This allows an attacker with write access to a parent directory to redirect file capability updates to an attacker-controlled file. By doing so, capabilities can be injected into or stripped from unintended executables, leading to privilege escalation.
    Added CVSS V3.1 AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
    Added CWE CWE-367
    Added Reference https://access.redhat.com/security/cve/CVE-2026-4878
    Added Reference https://bugzilla.redhat.com/show_bug.cgi?id=2447554
    Added Reference https://bugzilla.redhat.com/show_bug.cgi?id=2451615
  • CVE Modified by af854a3a-2127-422b-91ae-364da2661108

    Apr. 09, 2026

    Action Type Old Value New Value
    Added Reference http://www.openwall.com/lists/oss-security/2026/04/07/14
    Added Reference http://www.openwall.com/lists/oss-security/2026/04/07/4
    Added Reference http://www.openwall.com/lists/oss-security/2026/04/08/9
    Added Reference http://www.openwall.com/lists/oss-security/2026/04/09/5
    Added Reference http://www.openwall.com/lists/oss-security/2026/04/09/6
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.